const express = require('express');
const app = express();
app.use(express.static('./images'));
const ejs = require('ejs');
app.get('/', (req, res) => {
  let items = [
    { name: 'a', age: 20, sex: '男' },

    { name: 'a', age: 20, sex: '男' },

    { name: 'a', age: 20, sex: '男' },
  ];
  ejs.renderFile('./index.ejs', { items: items }, (err, str) => {
    res.send(str);
  });
});
app.listen(8000, (req, res) => {
  console.log('server is running http://127.0.0.1:8000');
});
